package net.towee.model.repo.impl;

import java.util.Date;

import net.towee.model.account.AccountIdentity;
import net.towee.model.repo.DocumentDiff;

import com.google.code.morphia.annotations.Embedded;
import com.google.code.morphia.annotations.Reference;

/**
 * Implementation of document diff
 * @author c58
 */
@Embedded
public class DocumentDiffImpl implements DocumentDiff {
	private String patchId;
	@Reference private AccountIdentity author;
	private String explain;
	private Date creationDate;

	public DocumentDiffImpl(){}
	public DocumentDiffImpl(String patchId, AccountIdentity author, String explanation){
		this.patchId = patchId;
		this.author = author;
		this.explain = explanation;
		this.creationDate = new Date();
	}
	
	@Override
	public String getPatchId() {
		return patchId;
	}

	@Override
	public AccountIdentity getAuthor() {
		return author;
	}

	@Override
	public Date getCreationDate() {
		return creationDate;
	}

	@Override
	public String getExplanation() {
		return explain;
	}

}